package com.cxx.common.dto;

import com.cxx.common.PlainView;
import com.cxx.common.ReadView;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;

@Getter
@Setter
@JsonView(PlainView.class)
public class UserDto {
    @Schema(description = "id")
    @JsonView(ReadView.class)
    private Long id;

    @Schema(description = "账号id")
    @JsonView(ReadView.class)
    private Long accountId;

    @Schema(description = "账号名称")
    @JsonView(ReadView.class)
    private String accountName;
    
    @Schema(description = "用户名称")
    @NotBlank(message = "用户名称不能为空")
    private String username;

    @Schema(description = "性别")
    private Integer gender;

    @Schema(description = "身份证号")
    private String idNumber;

    @Schema(description = "手机号码")
    private String phoneNumber;

    @Schema(description = "电子邮件")
    private String email;

    @Schema(description = "生日")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthDate;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "地区")
    private List<String> area;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "职业")
    private String job;

    @Schema(description = "标签")
    private List<String> tags;

    @Schema(description = "描述")
    private String description;
}
